import { NgModule }               from '@angular/core';
import { Routes, RouterModule }   from '@angular/router';
import { ProfileComponent }       from './profile.component';
import { ProfileEditorComponent } from './profile-editor.component';
import { ProfileInfoComponent }   from './profile-info.compoenent';


const routes: Routes = [
  {
    path: 'profile',
    component: ProfileComponent,
    children: [
        // { path: '', redirectTo: 'profile-info', pathMatch: 'full'},
        { path: 'profile-info', component: ProfileInfoComponent },
        { path: 'profile-editor', component: ProfileEditorComponent }
    ],
    data: {
      title: 'User Profile'
    }
  }
];


@NgModule({
  imports: [
    RouterModule.forChild(routes)
  ],
  exports: [RouterModule]
  // declarations: [
  //   RouterModule
  // ]
})
export class ProfileRoutingModule {}
